
Change Letter Case

JavaScript for Adobe InDesign

Change matching text to uppercase, lowercase, title case, or sentence case. A recent project I had to convert a directory created in InDesign to HTML for a website. In the layout, the categories and company names used a paragraph style set to all-caps, and the client wanted the same look online. But the Content Management System where it was going didn't have a way to set up classes for the all-caps text decoration. So I made this script to convert the text in the particular paragraph styles to actual capital letters, not just a styling assignment. Then I figured add the character style option and match with GREP, too. Could come in handy in the future.

Match with GREP
Match by character style
Match by paragraph style
Adapt open source to create other scripts

Instructions for use
The interface is one input field and three drop-down lists. Set desired options, and then click the OK button to begin.

GREP — enter a GREP expression just as in the InDesign Find/Change dialog. Characters that match the GREP expression are changed to the letter case set below.

Character Style — select a character style and characters assigned the style are changed to the letter case set below.

Paragraph Style — select a paragraph style and paragraphs assigned the style are changed to the letter case set below. Changes the entire paragraph.

Change to — the desired letter case. Choices are UPPERCASE, lowercase, Title Case, and Sentence case.

For help installing scripts, see https://www.marspremedia.com/software/how-to-adobe-cc

IMPORTANT: by downloading the script you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.

For further questions or comments, contact the author William Campbell at william@marspremedia.com
